import { axios } from '@/utils/request'

const urlList = {
  createQuestion: '/question/oesQuestion/add',
  getQuestionList: '/question/oesQuestion/list',
  getQuestionById: '/question/oesQuestion',
  getQuestionByIds: '/question/oesQuestion/getquestions',
}
export function createQuestion(parameter) {
  return axios({
    url: urlList.createQuestion,
    method: 'post',
    data: parameter
  })
}

export function getQuestionList(params) {
  return axios({
    url: urlList.getQuestionList,
    method: 'get',
    params,
  })
}

export function getQuestionByIds(parameter) {
  return axios({
    url: urlList.getQuestionByIds,
    method: 'post',
    data: parameter
  })
}

export function getQuestionById(id){
  return axios({
    url: urlList.getQuestionById + '/' + id,
    method: 'get'
  })
}
